package com.tsingteng.cosfun.ui.cosfun;

import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;

import com.tsingteng.cosfun.R;
import com.tsingteng.cosfun.base.BaseFragment;
import com.tsingteng.cosfun.ui.cosfun.cosinterface.ObserverListener;
import com.tsingteng.cosfun.ui.cosfun.cosinterface.ObserverManager;

public class PersonalFragment extends BaseFragment implements ObserverListener {
    TextView tv = null;

    @Override
    protected void initView() {
        tv = rootView.findViewById(R.id.p_tv);
        ObserverManager.getInstance().add(this);
    }

    @Override
    protected void getBundle(Bundle bundle) {

    }

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_personal;
    }

    @Override
    public void onResume() {
        super.onResume();
    }

    @Override
    public void onPause() {
        super.onPause();
    }


    @Override
    public void observerUpData(int eventType, int index, int id) {
        if (eventType == ObserverListener.EVENT_CHANGE_OPUS)
            tv.setText("我的id=" + index);
    }
}
